package com.ke.searchhouse.repository;

import java.util.List;

import com.ke.searchhouse.entity.SupportAddress;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;


/**
 * @author  keke
 * @create  2018/10/15 0015 下午 9:58
 * @desc
 **/
public interface SupportAddressRepository extends JpaRepository<SupportAddress, Long> {
    /**
     * 获取所有对应行政级别的信息
     * @return
     */
    List<SupportAddress> findAllByLevel(String level);

    SupportAddress findByEnNameAndLevel(String enName, String level);

    SupportAddress findByEnNameAndBelongTo(String enName, String belongTo);

    List<SupportAddress> findAllByLevelAndBelongTo(String level, String belongTo);

}
